adding sqlite::endr, and ability to give functions to database_binder#113
Open
bstarynk wants to merge 1 commit intoSqliteModernCpp:masterfrom
Open
adding sqlite::endr, and ability to give functions to database_binder#113bstarynk wants to merge 1 commit intoSqliteModernCpp:masterfrom
bstarynk wants to merge 1 commit intoSqliteModernCpp:masterfrom
Conversation
Collaborator
|
@bstarynk Have you seen the |
zauguin
reviewed
Apr 28, 2017
|
|
||
| } | ||
|
|
||
| auto ppsc = db << "CREATE TABLE tnums(name VARCHAR(30) PRIMARY KEY ASC NOT NULL UNIQUE, num INT NOT NULL);"; |
Collaborator
There was a problem hiding this comment.
This statement is never executed. Either don't save the prepared statement to execute it implicitly or call execute/endr/operator++.
| execute(); | ||
| reset(); | ||
| } | ||
|
|
Collaborator
There was a problem hiding this comment.
We already have the operator, so I don't think we need a member function. If we keep this function, we may prefer a more descriptive name.
| f(db); | ||
| return db; | ||
| } | ||
|
|
Collaborator
There was a problem hiding this comment.
Can we use our function_traits instead of std::function here to avoid type-erasure?
What is the use-case for calling this with a lambda?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We add the ability to force the end of a prepared statement with
endrand the ability to give functions to them.